package com.tedu.service.impl;

import com.tedu.dao.UserDao;
import com.tedu.dao.impl.UserDaoImpl;
import com.tedu.entity.User;
import com.tedu.service.UserService;

import java.sql.SQLException;

public class UserServiceImpl implements UserService {

    //创建dao层对象
    private UserDao userDao = new UserDaoImpl();

    @Override
    public User loginUser(User user) {
        User user1 = null;
        try {
            user1 = userDao.loginUser(user);
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        return user1;
    }
}
